import java.util.*;

public class Course {
	String name;
	int id;
	int numEachWeek;
	String teacherName;
	static LinkedList<Integer> ids = new LinkedList<Integer>();
	static Random rand = new Random();
	int size;
	LinkedList<Class> relatedClasses = new LinkedList<Class>();

	public Course(String name, String teacherName, int numEachWeek,
			int courseSize) {
		this.name = name;
		this.teacherName = teacherName;
		this.numEachWeek = numEachWeek;
		this.id = this.generateID();
		this.size = courseSize;
		// TODO Auto-generated constructor stub
	}

	int generateID() {
		int id;
		do {
			id = rand.nextInt(1000);
		} while (ids.contains(new Integer(id)));
		ids.add(new Integer(id));
		return id;
	}

	void show() {
		System.out.println("Course:" + this.name + " numEachWeek: "
				+ this.numEachWeek + " Teacher:" + teacherName);
	}
}
